from django.conf.urls.defaults import patterns, include, url
from django.contrib import admin
from main.views import home, login_variants
from main.views import profile_edit
from main.loginza_auth import complete_registration
from api.views import test_api
from main.views import haml_test

admin.autodiscover()

urlpatterns = patterns('',

    url(r'^$', home, name='home'),
    url(r'^blog', include('blog.urls')),
    url(r'^polls/', include('poll.urls') ),
    url(r'^editprofile', profile_edit, name='editprofile'),
    url(r'^login$', login_variants, name='login_variants'),
    url(r'^loginza/', include('loginza.urls')),

    url(r'^complete_registration/$', complete_registration, name='users_complete_registration'),
    url(r'^logout/$', 'django.contrib.auth.views.logout', name='users_logout'),

    url(r'^admin/doc/', include('django.contrib.admindocs.urls')),
    url(r'^admin/', include(admin.site.urls)),

    url(r'^api$', test_api),
    url(r'^api/(?P<api_type>.+)/', test_api),

    url(r'^haml_test$', haml_test),
)
